﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace LJX.SmartPark.EntityFramework.Migrations
{
    public partial class create3 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "EquipMentNum",
                table: "TricolourLightLog",
                type: "nvarchar(max)",
                nullable: false,
                defaultValue: "",
                oldClrType: typeof(string),
                oldType: "nvarchar(max)",
                oldNullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "ClosingTime",
                table: "TricolourLightLog",
                type: "datetime2",
                nullable: true);

            migrationBuilder.AddColumn<bool>(
                name: "ConnectionStatus",
                table: "TricolourLightLog",
                type: "bit",
                nullable: true);

            migrationBuilder.AddColumn<bool>(
                name: "OpenStatus",
                table: "TricolourLightLog",
                type: "bit",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "OpeningTime",
                table: "TricolourLightLog",
                type: "datetime2",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Principal",
                table: "TricolourLightLog",
                type: "nvarchar(max)",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<string>(
                name: "Remark",
                table: "TricolourLightLog",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.CreateTable(
                name: "LargeScreen",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    EquipmentNum = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    bit = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    LightPostNum = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    LocalArea = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    OpeningTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    ClosingTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_LargeScreen", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "LargeScreen");

            migrationBuilder.DropColumn(
                name: "ClosingTime",
                table: "TricolourLightLog");

            migrationBuilder.DropColumn(
                name: "ConnectionStatus",
                table: "TricolourLightLog");

            migrationBuilder.DropColumn(
                name: "OpenStatus",
                table: "TricolourLightLog");

            migrationBuilder.DropColumn(
                name: "OpeningTime",
                table: "TricolourLightLog");

            migrationBuilder.DropColumn(
                name: "Principal",
                table: "TricolourLightLog");

            migrationBuilder.DropColumn(
                name: "Remark",
                table: "TricolourLightLog");

            migrationBuilder.AlterColumn<string>(
                name: "EquipMentNum",
                table: "TricolourLightLog",
                type: "nvarchar(max)",
                nullable: true,
                oldClrType: typeof(string),
                oldType: "nvarchar(max)");
        }
    }
}
